



def sum(arr):
    if arr:
        if len(arr)>1:
            temp = arr[0]
            arr.pop(0)
            return temp+sum(arr)
        else:
            return arr[0]
    else:
        return 0

arr=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]

print(sum(arr))

